﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace NUS.ISS.ARS.BusinessEntity.ViewModels
{
    public class FlightScheduleView
    {

        [Required(ErrorMessage = "Flight Number is required")]
        [DisplayName("Flight Number")]

        public string FlightNumber { get; set; }
        [DisplayName("From Airport")]
        public string FromAirport { get; set; }
        [DisplayName("To Airport")]
        public string ToAirport { get; set; }
        [DisplayName("From City")]
        public string FromCity { get; set; }
        [DisplayName("To City")]
        public string ToCity { get; set; }
        [Required(ErrorMessage = "Departure Time is required")]
        [DisplayName("Departure Time")]
        [RegularExpression(@"^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$",
            ErrorMessage = "The format should be in time HH:MM:SS")]
        public System.TimeSpan DepartureTime { get; set; }
        [Required(ErrorMessage = "Arrival Time is required")]
        [DisplayName("Arrival Time")]
        [RegularExpression(@"^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$",
            ErrorMessage = "The format should be in time HH:MM:SS")]
        public System.TimeSpan ArrivalTime { get; set; }
        [Required(ErrorMessage = "Adult Fare is required")]
        [DisplayName("Adult Fare")]
        [RegularExpression(@"\d{1,16}.\d{0,2}",
            ErrorMessage = "The format should be in 18 digits and in terms of money format xx.yy")]
        public decimal AdultFare { get; set; }
        [Required(ErrorMessage = "Child Fare is required")]
        [DisplayName("Child Fare")]
        [RegularExpression(@"\d{1,16}.\d{0,2}",
            ErrorMessage = "The format should be in 18 digits and in terms of money format xx.yy")]
        public decimal ChildFare { get; set; }
        public long FlightScheduleId { get; set; }
        [Required(ErrorMessage = "Infant Fare is required")]
        [DisplayName("Infant Fare")]
        [RegularExpression(@"\d{1,16}.\d{0,2}",
            ErrorMessage = "The format should be in 18 digits and in terms of money format xx.yy")]
        public decimal InfantFare { get; set; }
        public bool isDeleted { get; set; }
        public int AirplaneId { get; set; }
        [Required(ErrorMessage = "From Airport Name is required")]
        [DisplayName("From Airport Number")]
        [RegularExpression(@"/d$",
            ErrorMessage = "The format should be in digits")]
        public int FromAirportId { get; set; }
        [Required(ErrorMessage = "To Airport Name is required")]
        [DisplayName("To Airport Number")]
        [RegularExpression(@"[0-9]{1,10}",
            ErrorMessage = "The format should be in digits")]
        public int ToAirportId { get; set; }
        public IEnumerable<Airport> ListofAirportname { get; set; }
        public IEnumerable<City> ListofCityname { get; set; }
        public IEnumerable<Aircraft> ListofAircraftname { get; set; }
        [DisplayName("Airplane Model")]
        public string AirplaneModel { get; set; }
    }
}
